package com.mxpio.erp.equipment.service.impl;

import com.mxpio.erp.common.equipment.entity.EquipmentCommParametersDetail;
import com.mxpioframework.jpa.JpaUtil;
import org.springframework.stereotype.Service;

import com.mxpio.erp.common.equipment.entity.EquipmentCommParameters;
import com.mxpio.erp.common.equipment.service.EquipmentCommParametersService;
import com.mxpioframework.system.service.impl.BaseServiceImpl;
import org.springframework.transaction.annotation.Transactional;

/**
 * 公共参数Service业务层处理
 *
 * @author Cheng
 * @date 2023-06-28
 */
@Service
public class EquipmentCommParametersServiceImpl extends BaseServiceImpl<EquipmentCommParameters> implements EquipmentCommParametersService {

    @Override
    @Transactional(readOnly = false)
    public void updateParam(EquipmentCommParameters parameters) {
        this.update(parameters);
        JpaUtil.lind(EquipmentCommParametersDetail.class).equal("paraId", parameters.getId()).delete();
    }
}
